public class Main{
	public static void main(String[] args){
		//1~100的求和
		int sum = 0;
		int n = 1;

		do{
			sum = sum + n;
			n++;
		} while(n <= 100);
		System.out.println(sum);


		//do while循环机算m~n的和
		int sum = 0;
		int m = 20;
		int n = 100;

		//使用do while机算M+...+N:
		do{
			sum = sum + m;
			m++;
		}while(m <= n);
		System.out.println(sum);
	}
}